^!f::
; Window to fullscreen
LWIN & LButton::
SetTitleMatchMode, 2

WinGet, TempWindowID, ID, A 
WinGet Style, Style, A

SysGet, ScreenWidth, 0
SysGet, ScreenHeight, 1

SysGet, WindowWidth, 61
SysGet, WindowHeight, 62

If (WindowID != TempWindowID) 
{ 
  WindowID:=TempWindowID 
  WindowState:=0 
}

;MsgBox, Width and height: %ScreenWidth%`, %ScreenHeight%

If (Style & 0xC40000)
{ 
  WinGetPos, WinPosX, WinPosY, WindowWidth, WindowHeight, ahk_id %WindowID% 
  WinSet, Style, -0xC40000, ahk_id %WindowID%
  WinMove, ahk_id %WindowID%, , 0, 0, ScreenWidth, ScreenHeight 
} 
Else 
{ 
  WinSet, Style, +0xC40000, ahk_id %WindowID%
  WinMove, ahk_id %WindowID%, , 0, 0, WindowWidth, WindowHeight
}
return